package com.ruoyi.match.enums;

import com.ruoyi.common.core.domain.R;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author sjz
 * @Date 2023/11/8 17:36
 * @Desc
 */


@Getter
@AllArgsConstructor
public enum JqEnum {
    JQ_0(0,"总进球0"),
    JQ_1(1,"总进球1"),
    JQ_2(2,"总进球2"),
    JQ_3(3,"总进球3"),
    JQ_4(4,"总进球4"),
    JQ_5(5,"总进球5"),
    JQ_6(6,"总进球6"),
    JQ_gt_6(7,"总进球大于6"),
    ;


    private Integer index;
    private String code;


    public static JqEnum getJqByNum(int num){
        for (JqEnum value : JqEnum.values()) {
            if(value.index == num){
                return value;
            }else if(num > 6){
                return JqEnum.JQ_gt_6;
            }
        }
        return null;
    }
}
